All Questions
Tagged with decorator-patterndesign-patterns
4 questions
0votes
1answer
111views
Refactoring Agreement Status Logic: Applying SOLID Principles and Separating Logging/Auditing with Decorators
I have some production code that contains a lot of repetition and mixes business logic with auditing and logging. I've made two attempts at refactoring it, primarily using decorators. I'd like to get ...
6votes
3answers
670views
Password checker using Decorator Pattern
I'm currently trying a Password checker for password in Decorator Pattern, which will point out what the current password missing to be a strong password (my example will check for 8 characters, at ...
1vote
0answers
77views
Check that inputs are valid dates
I have a method in a class that accepts either a datetime or string parameter. It is shown in the last code block (I didn't include the class). A little background is that I am defining a wrapper ...
0votes
1answer
340views
Decorator Pattern with member functions
Motivation: without SaveDecorator, we would have to write: ...